package com.jelly.io.input;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * 缓冲输入文件
 * @author Jelly
 *
 */
public class BufferedInputFile {
	public static String read(String fileName) throws IOException{
		BufferedReader br = new BufferedReader(new FileReader(fileName));
		StringBuilder sb = new StringBuilder();
		String str;
		while((str=br.readLine())!=null){
			sb.append(str+"\n");
		}
		br.close();
		return sb.toString();
	}
	public static void main(String[] args) throws IOException {
		System.out.println(read("src\\com\\jelly\\io\\input\\BufferedInputFile.java"));
	}
}
